<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>测试消息</title>
</head>
<body>
    <div align="center">
        <button onclick="return test($('#token').val())">点击发送不需要视图的消息</button>
        <br>
        <hr>
        <form id="users_form" th:action="@{/send/wv}" method="POST">
            <input id="token" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" type="hidden" />
            <input type="text" th:name="source" th:value="${session.login_usr_uid}" />
            <input type="text" th:name="type" th:value="0" />
            <input type="text" th:name="data" value="" />
            <input type="text" th:name="needView" th:value="1" />
            <input type="text" th:name="dest" th:value="0" />
            <input type="submit" value="点击发送需要视图的消息">
        </form>
    </div>

    <script>
        function test(token) {
            alert("发送消息..." + token);
            var source = 1;
            var type = 0;
            var data = "";
            var needView = NO_VIEW;
            var dest = 0;
            call(null, source, type, needView, data, dest, token);
            return false;
        }
    </script>

    <!-- refs -->
    <script type="text/javascript" th:src="@{/asserts/js/common.js}" ></script>
    <script type="text/javascript" th:src="@{/webjars/jquery/3.3.1/jquery.js}" ></script>

</body>
</html>